#pragma once
#include "SceneManager.h"
#include "SoundManager.h"
#include "TextureManager.h"
#include "InputManager.h"
#include "D3D9.h"

#define SharedDirector() Director::sharedDirector()

class Director
{
private:
	InputManager * m_Input;
	SceneManager * m_Scene;
	SoundManager * m_Sound;
	TextureManager * m_Txt;
	D3D9 * m_d3d9;

	static Director * m_pDirector;

	Director(void);
public:
	virtual ~Director(void);
	static Director * sharedDirector();
	void Update();
	
	void init(void);

	void InitInput(HWND hWnd, HINSTANCE hInstance);
	HRESULT InitD3D9(HWND hWnd, int nWidth, int nHeight, bool bFullScreen);

	RootScene * GetScene(){return m_Scene->GetNowScene();}
	D3D9 * GetD3D9(){return m_d3d9;}
	InputManager* GetInput(){return m_Input;}
	Texture* GetTexture(string name){return m_Txt->getTexture(name);}
	SceneManager* GetSceneManager(){return m_Scene;}
	SoundManager* GetSoundManager(){return m_Sound;}
};